<template>
  <div class="panel weather-info">
    <h2 class="panel-title">天气信息</h2>
    <div class="weather-content">
      <!-- 静态天气数据 -->
      <div class="weather-main">
        <div class="temp">{{ weather.temperature }}°C</div>
        <div class="weather-desc">{{ weather.description }}</div>
      </div>
      <div class="weather-details">
        <div class="detail-item">
          <span class="label">湿度:</span>
          <span class="value">{{ weather.humidity }}%</span>
        </div>
        <div class="detail-item">
          <span class="label">风速:</span>
          <span class="value">{{ weather.windSpeed }}m/s</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const weather = ref({
  temperature: 26,
  description: '晴',
  humidity: 65,
  windSpeed: 3.2
})
</script>

<style scoped>
.weather-info {
  height: 200px;
}

.weather-content {
  padding: 15px;
}

.weather-main {
  text-align: center;
  margin-bottom: 20px;
}

.temp {
  font-size: 36px;
  color: #42b983;
  margin-bottom: 5px;
}

.weather-desc {
  color: #888;
}

.weather-details {
  display: flex;
  justify-content: space-around;
}

.detail-item {
  text-align: center;
}

.label {
  color: #888;
  font-size: 14px;
  margin-right: 5px;
}

.value {
  color: #42b983;
}
</style> 